Previous Book Contents Book Index Next

Inside Macintosh: Using JBindery /
Chapter 1 - Using JBindery / Examples


Executing a Java Application

You can also use JBindery to simply execute a Java application rather than package it. In such cases, JBindery acts as the wrapper application that sets up the Java virtual machine and calls the main method. To execute a Java application, you should do the following:

  1. Drag the class file or zip package containing the application's main method onto the JBindery icon. Alternatively, you can launch JBindery and then enter the class name manually in the Command panel.
  2. In the Command panel, enter any parameters your application requires and choose paths for console output and input.
  3. In the Classpath panel, enter the search paths to include when looking for Java classes.
  4. In the Properties panel, enter any property/value pairs you want to include with your application.
  5. In the Appearance panel, select any desired appearance features.
  6. In the Security panel, specify any proxy servers, if desired, and choose whether you want to use the code verifier.
  7. In any of the panels, select the Run button (or press the Return key) to execute the Java application.

JBindery quits automatically when you exit the Java application. In cases where you might want to run the Java application repeatedly (for example, for tests during development) you can save a JBindery settings file. To do so, simply select Save Settings... from any of the panels after following steps 1 through 6. When the save dialog box appears, choose a name for the settings file, but do not select the Save as Application checkbox.

The saved settings are stored as a JBindery document. Clicking on the document icon automatically launches JBindery, which then reads in the settings. To run the Java application with stored settings, you must then select the Run button in any panel.

IMPORTANT
The Finder considers JBindery to be the executing application when you use it to simply execute Java applications. For example, if you specified a class path using the variable /$APPLICATION/, the path is relative to the location of JBindery, not the location of the Java application's classes.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
22 APR 1997